<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const btnClick = () => {
  router.push('/?id=999')
}
</script>

<template>
  <div class="home-page">
    <button @click="$router.push('/')">跳转</button>
    <button @click="btnClick">跳转</button>
  </div>
</template>

<style scoped></style>
